package design_pattern.combination;

public class Client {
    public static void main(String[] args) {
        AbstractFile file1, file2, file3, file4, file5, file6, file7;
        Folder folder1, folder2, folder3, folder4, folder5, folder6;
        folder1 = new Folder("Sunny 的资料");
        folder2 = new Folder("图像文件夹");

        folder3 = new Folder("jpg文件夹");
        file1 = new ImageFile("小龙女.jpg");
        file2 = new ImageFile("杨过.jpg");
        folder3.add(file1);
        folder3.add(file2);

        folder4 = new Folder("gif文件夹");
        file3 = new ImageFile("张无忌.gif");
        file4 = new ImageFile("雕兄.gif");
        folder4.add(file3);
        folder4.add(file4);

        folder5 = new Folder("视频文件夹");
        file5 = new VideoFile("笑做江湖.rmvb");
        folder5.add(file5);

        folder6 = new Folder("文本文件夹");
        file6 = new TextFile("九阴真经.txt");
        file7 = new TextFile("葵花宝典.doc");
        folder6.add(file6);
        folder6.add(file7);

        folder1.add(folder2);
        folder1.add(folder5);
        folder1.add(folder6);

        folder2.add(folder3);
        folder2.add(folder4);

        folder1.killVirus();
    }
}
